﻿/**
 * @file hal_uart.c
 * @brief this is a brief description
 * @details this is the detail description.
 * @author fulong 
 * @data 7/14/2014
 * @version 1.0
 * @par Copyright (c):
 * @par First build
 *     version: fulong 
 *     data: 7/14/2014
 */
#include "hal_uart.h"
#include "../dev/uart.h"
 
#define PRINTF_LEN_MAX 100
void debug_uart_send_string(const uint8*data)
{
	uint8 i=0;
	while(data[i]!=0)
	{
		debug_send_byte(data[i]);
		i++;
		if(i>PRINTF_LEN_MAX)return;
	}
}
void uart_send_string(const uint8*data)
{
	uint8 i=0;
	while(data[i]!=0)
	{
		send_byte(data[i]);
		i++;
		if(i>PRINTF_LEN_MAX)return;
	}
}
void uart_send_string_with_len(const uint8*data,uint8 len)
{
	uint8 i=0;
	while(len--) 
	{
		send_byte(data[i]);
		i++;
		if(i>PRINTF_LEN_MAX)return;
	}
}
